Skip to content

Conversation

jeanschmidt
Copy link
Contributor

Currently we've been guessing org/repo to authenticate in most cases, this configuration when set both enforce validation and defaults to the given org/repo for authentication.

This enables scaleUpChron to run properly when the org/repo for the scale config is not the same as the one used to authenticate and being managed.

additional small fixes to remove warnings on linting that have been ignored.

Copy link

vercel bot commented Sep 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Updated (UTC)
torchci Ignored Ignored Preview Sep 18, 2025 1:47pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 11, 2025
Copy link
Contributor

@ZainRizvi ZainRizvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks reasonable, but currently there are bugs. Also not too sure about the naming

default = ""
}

variable "auth_gh_org" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming nit: can we have a name without "auth" in it? Maybe "ci_github_org" or just "github_org"

The auth part is rather incidental here (a gh app can be authorized to affect multiple github orgs). The key thing we want to know is which github org is this particular autoscaler fleet supposed to be managing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as here https://github.com/pytorch/test-infra/pull/7152/files/d5b2cab0b9a3d87bf5c93e050a331f323e1104f6#r2356755756

there are quirks on authenticating that go beyond just managing, and I wanted to make it explicit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, makes sense. Maybe just update the description in that case to explain the reasoning here. Something like: "Github organization this runner fleet is authorized to have access to"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

humm, I'll keep like this, it is the main use as the one provided when authenticating, this changes the key and installation ID for the Github APP and those are relevant informations.

It is not only the one that the fleet is authorized to, but it is the one it is authorized by... and make it very explicit seems reasonable to me.

const validRunnerTypes = await getRunnerTypes(
// For scaleUpChron, we don't have a situation where the auth repo is different from the config repo
// so we can just pass the same repo for both parameters
repo,
repo,
scaleConfigRepo,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment up above this line should be updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not delete the comment? The one one lines 23-24 no longer apply

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, sorry for missing this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default = ""
}

variable "auth_gh_org" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, makes sense. Maybe just update the description in that case to explain the reasoning here. Something like: "Github organization this runner fleet is authorized to have access to"

const validRunnerTypes = await getRunnerTypes(
// For scaleUpChron, we don't have a situation where the auth repo is different from the config repo
// so we can just pass the same repo for both parameters
repo,
repo,
scaleConfigRepo,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not delete the comment? The one one lines 23-24 no longer apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants